// pages/user/user.js
Page({
  data: {
    userinfo: {},
    collectNum: 0//被收藏商品的数量
  },

  onShow() {
    const userinfo = wx.getStorageSync('userinfo');
    const collect = wx.getStorageSync('collect');
    this.setData({
      userinfo: userinfo,
      collectNum: collect.length
    })
  },


})